<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>


<script type="text/javascript" src="js/jquery.itextclear.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('input[type=text], input[type=password], input[type=url], input[type=email], input[type=number], textarea', '.form').iTextClear();
});
</script>
<!-- jQplot CSS -->

<link rel="stylesheet" media="screen" href="css/Tree.css" />
<!-- jQplot CSS END -->

<!-- DATATABLES CSS -->
<link rel="stylesheet" media="screen" href="lib/datatables/css/vpad.css" />
<script type="text/javascript" src="lib/datatables/js/jquery.dataTables.js"></script>

<h1 class="page-title">定${history_list_type==1?"性":"量"}考核-考核历史浏览</h1>


<div class="container_12 clearfix leading">
    <section class="tabs grid_12 leading">
        <ul class="clearfix">
            <li><a href="#" class="current">${topOrganizationName}</a></li>
        </ul>
        <section>
            <section class="clearfix" style="display: block;">
                <header class="grid_12 alpha omega">
                    <p>
                        筛选：
                        <select style="opacity: 0;" id="periodtype_sel_1">
                            <option value="monthly">月度</option>
                            <option value="bimonthly">双月</option>
                            <option value="season">季度</option>
                            <option value="semiyearly">半年</option>
                            <option value="annually">一年</option>
                        </select>
                        <span>
		                    <input type="button" onclick="javascript:search()" value="点击搜索">
						</span>
                    </p>
                </header>
                <div id="demo" class="clearfix">
                    <table class="display" id="example">
                        <thead>
                        <tr>
                            <th>姓名</th>
                            <th>部门</th>
                            <th>岗位</th>
                            <th>职等</th>
                            <s:if test="#request.examPeriods != null and #request.examPeriods.size() > 0">
                                <s:iterator value="#request.examPeriods" var="period">
                                    <th>${period.periodName}</th>
                                </s:iterator>
                            </s:if>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <s:if test="#request.examStatisticsPojos==null or #request.examStatisticsPojos.size() <= 0">
                            <tr class="gradeX">
                                <td colspan="8">暂无数据</td>
                            </tr>
                        </s:if>
                        <s:else>
                            <s:iterator value="#request.examStatisticsPojos" var="static" status="sta">
                                <s:if test="#sta.even"> <tr class="gradeA"> </s:if> <s:else> <tr class="gradeC"> </s:else>
                                <td>${static.name}</td>
                                <td>${static.fullName}</td>
                                <td>${static.dutyName}</td>
                                <td>${static.gradeName}-${static.gradeSort}</td>
                                <td>${static.early}</td>
                                <td>${static.previous}</td>
                                <td>${static.current}</td>
                                <td>
                                    <s:if test="#request.history_list_type == 1">
                                    <a class="button" href="#public/qual_score_browse_detail.xhtml?type=${type}&y=${examPeriods[2].examYear}&m=${examPeriods[2].examMonthly}"><span
                                        style="background: url(${ctx}/images/img/chart_curve.png)" class="icon">&nbsp;</span>查看全年分数</a></td>
                                    </s:if>
                                <s:else>
                                    <a href="#public/quan_histroy_detail.xhtml?type=${type}" class="button">
                                        <span class="icon" style="background: url(/images/img/chart_curve.png)">&nbsp;</span>查看全年分数</a>
                                </s:else>
                                </tr>
                            </s:iterator>
                        </s:else>
                        </tbody>
                    </table>
                </div>
            </section>
        </section>
    </section>
</div>

<div class="clear"></div>


<script type="text/javascript" src="js/Tree.js"></script>
<!-- POPOVER SETUP--><script type="text/javascript" src="js/Tree.js"></script>

<script type="text/javascript">
    $(function(){
        setTimeout("init()", 800)
    });
    function init(){
        $("#periodtype_sel_1").val("${type}");
        $("#periodtype_sel_1").prev("span").html("${type.name}")
    }
    function search(){
        var list_type = "${history_list_type}";
        var type = $("#periodtype_sel_1").val();
        if(list_type == 1){
            window.location.href = "#public/qual_score_browse_user.xhtml?type="+type;
        }else{
            window.location.href = "#public/quan_score_browse_user.xhtml?type="+type;
        }
    }
</script>
